form {
    line-height: 1.15;
    font-weight: normal;
    margin: 0.5rem 0;
}

form input, form button {
    outline: none;
}

form fieldset {
    border: 0;
    margin-bottom: 1rem;
    padding: 0;
}

form label {
    position: relative;
}

form label span {
    position: absolute;
    color: var(--base-text);
    top: calc(0.875em / 2 - 6px);
    font-size: 1em;
    left: 0.666em;
    transition: font-size 0.1s ease-in-out, top 0.1s ease-in-out, color 0.1s ease-in-out;
    pointer-events: none;
}

form label input:not(:placeholder-shown) ~ span {
    font-size: 0.75em;
    top: -0.9em;
    left: 0.666rem;
    color: var(--base-text);
}

form button {
    border-radius: 0.225em;
    background-color: var(--primary-main);
    color: var(--base-white);
    border-width: 0;
    padding: 0.875em 0.5em;
    transition: background-color 0.1s ease-in-out, color 0.1s ease-in-out;
    margin-top: 3rem;
    cursor: pointer;
}

form button:hover {
    background-color: var(--primary-half);
    color: var(--primary-dark);
}

form label input {
    border-radius: 0.166em;
    background-color: var(--base-black);
    border-width: 0;
    color: var(--base-white);
    padding: 0.875em 0.666em;
    font-size: inherit;
    line-height: 168%;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 8px;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
}

fieldset .input-form-messages, .form-messages {
    font-size: 14px;
    margin-bottom: 24px;
    padding: 0 2px;
}

fieldset .input-form-messages .info,
fieldset .input-form-messages .error,
.form-messages .info,
.form-messages .error {
    margin-bottom: 8px;
}

form input::placeholder {
    color: transparent;
}

.password-visibility-toggle path {
    fill: var(--base-white);
}

.password-visibility-toggle {
    position: absolute;
    top: 0.2125rem;
    right: 1em;
    height: 1em;
    width: 1em;
    cursor: pointer;
}

input[type="text"] ~ .password-visibility-toggle .eye-closed,
input[type="password"] ~ .password-visibility-toggle .eye-open {
    display: inline;
}

input[type="password"] ~ .password-visibility-toggle .eye-closed,
input[type="text"] ~ .password-visibility-toggle .eye-open  {
    display: none;
}
